<template>
  <div class="team-container">
    <div class="member-card" v-for="member in members ":key="member.id">
      <img :src="member.avatar" :alt="member.name" class="member-avatar" />
      <div class="member-info">
        <h3>{{ member.name }} ({{ member.id }})</h3>
        <h4>负责任务：</h4>
        <ul>
          <li v-for="(task, index) in member.tasks" :key="index">{{ task }}</li>
        </ul>
      </div>
    </div>
  </div>
  </template>
  
  <script setup>
import { reactive } from 'vue'
const members = reactive([
  {
    id: '2023400985',
    name: '梁晶',
    avatar: 'src/assets/images/member1.jpg',
    tasks: ['前端页面开发', '用户登录模块', 'API 对接'],
  },
  {
    id: '2023400918',
    name: '杨盼',
    avatar: 'src/assets/images/member2.jpg',
    tasks: ['数据库设计', '硬件接口开发', '报表生成模块'],
  },
  {
    id: '2023400923',
    name: '谢金',
    avatar: 'src/assets/images/member3.jpg',
    tasks: ['用户界面设计', '硬件接口开发', '报表生成模块'],
  },
])
</script>

  
  <style scoped>
  .member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 50px;
  }

  .team-container {
    display:flex;
    gap:40px;
  }
  
  .member-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
  }
  
  .member-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
  }
  
  .member-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #666;
  }
  
  .member-info ul {
    padding-left: 20px;
    margin: 0;
  }
  
  .member-info li {
    margin-bottom: 5px;
    font-size: 14px;
  }
  </style>